package org.seckill.dao;

import java.util.Date;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.seckill.entity.SuccessKilled;

public interface SuccessKilledDao {

	/**
	 * 杀入秒杀成功信息
	 * @param successkill
	 * @return 如果影响行数>1,表示更新的记录函数，=0 没有成功
	 */
	int insertSuccessKilled(@Param("seckill_id")long seckill_id ,@Param("user_phone")long user_phone);
	
	/**
	 * 根据id获取成功秒杀记录并带着秒杀产品
	 * @param seckillId
	 * @return
	 */
	SuccessKilled  queryByIdWithSeckill(@Param("seckillId")long seckillId,@Param("userPhone")long userPhone);


	void execute_seckill(Map<String, Object> map);
	
}
